package org.yin.hang.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.yin.hang.dao.AdminDao;
import org.yin.hang.pojo.admin;

import java.util.List;

@Controller
@RequestMapping("/admin")
@CrossOrigin("*")
public class adminController {
   @Autowired
    private AdminDao adminDao;


   @GetMapping("/search")
    @ResponseBody
    public List<admin> search() throws Exception{
       return adminDao.getAll();
   }
}
